import request from '@/utils/request'

// 查询请假列表
export function listLeaves(query) {
  return request({
    url: '/wsd_leaves/list',
    method: 'get',
    params: query
  })
}
// 查询请假详细
export function getLeaves(id) {
  return request({
    url: '/wsd_leaves/' + id,
    method: 'get'
  })
}

// 新增请假
export function addLeaves(data) {
  return request({
    url: '/wsd_leaves',
    method: 'post',
    data: data
  })
}

// 修改请假
export function updateLeaves(data) {
  return request({
    url: '/wsd_leaves',
    method: 'put',
    data: data
  })
}

// 删除请假
export function delLeaves(id) {
  return request({
    url: '/wsd_leaves/' + id,
    method: 'delete'
  })
}
